
import ResourceModel from '@/modules/ResourceModel'
import Axios from '@/modules/Axios'

class SaleIntention extends ResourceModel {
    constructor(){
        super('/sale_intentions');
    }


    //指派客户经理
    assignUser(id,assigned_user_id) {
        return new Promise(function(resolve, reject) {
            Axios.post('/sale_intentions/assign/'+id,{user_id:assigned_user_id})
            .then((response) => {
                resolve(response.data);
            });
        });
    }

    //开发结果:1成功/0失败
    customDevResult(id,result) {
        return new Promise(function(resolve, reject) {
            Axios.post('/sale_intentions/custom_dev_result/'+id,{result:result})
            .then((response) => {
                resolve(response.data);
            });
        });
    }
}

export default new SaleIntention();
